//
//  NSTimer+LYAdd.m
//  LYDevelopKit
//
//  Created by 李阳 on 2018/5/26.
//

#import "NSTimer+LYAdd.h"
#import "LYNSMacro.h"

LYSYNTH_DUMMY_CLASS(NSTimer_LYAdd)

@implementation NSTimer (LYAdd)

- (void)pause
{
    if (![self isValid])
    {
        return;
    }
    [self setFireDate:[NSDate distantFuture]];
}

- (void)resume
{
    if (![self isValid])
    {
        return;
    }
    [self setFireDate:[NSDate date]];
}

- (void)resumeAfterTimeInterval:(NSTimeInterval)interval
{
    if (![self isValid])
    {
        return;
    }
    [self setFireDate:[NSDate dateWithTimeIntervalSinceNow:interval]];
}

@end
